bell=x2c('07');div=x2c('01');parse UPPER VERSION ver;freq=substr(word(ver,6),1,2)
parse arg command args
upper command
Select
when command='ACHAN' then achan()
when command='REALL' then reall()
when command='VOTE' then vote()
when command='AWAY' then away()
when command='SHOW' then showlog()
when command='XDCC' then xdcc()
when command='PC' then pc()
when command='CYCLE' then cycle()
when command='CHOPS' then wchops()
when command='IKICK' then ikick()
when command='KB'|command='BK' then kb()
when command='SKICK' then skick()
when command='NFDEOP' then nfdeop()
when command='PBAN' then pban()
when command='J' then join()
when command='VOTETST' then votetst()
when command='KIGN' then ig()
when command='KUNG' then noig()
when command='AMSG' then amsg()
when command='NOPS' then wnops()
when command='KDCC' then kdcc()
when command='GETXDCC' then getxdcc()
when command='KBAN' then timeban()
when command='RESOLVE' then resolve()
otherwise
pr='KHelp'
cecho(pr,und(bld('Kuang Eleven Command')))
cecho(pr,'Usage: /kx [KEYWORD] [ARGUMENTS]')
cecho(pr,'AWAY <Reason> - Toggle Away Also : /Away and /Back')
cecho(pr,'VOTE - Kuang Lamuh Vote')
cecho(pr,'IKICK - Kick with making channel Invite briefly')
cecho(pr,'SKICK - Speak Kick')
cecho(pr,'KBAN - Ban with many options')
cecho(pr,'CHOPS - Write notice to All CHannel OPerators')
cecho(pr,'NOPS - Write notice to all non-channel operators')
cecho(pr,'XDCC - XDCC Server Also : /XDCC')
cecho(pr,'GETXDCC - Auto request and get an XDCC pack from someone')
end
exit
resolve:
pr='Resolve'
parse var args nick .
if nick=''|nick='?' then do
cecho(pr,'Usage : /RESOLVE [Nick]|[IP]')
exit
end
cecho(pr,'disabled')
exit
if pos('.',nick)=0 then do
nick=gethost(nick)
parse var nick . '@' nick .
end
ip=getnumip(nick)
cecho(pr,'Numeric ip for' bld(nick) ':' bld(ip))
exit
kdcc:
rts()
pr='KDCC'
parse var args nick .
if nick=''|nick='?' then do
cecho(pr,'Usage : /KDCC [Nick]')
exit
end
dir=rtfilerequest(,,'Pick files to be packed...',,'rtfi_flags = freqf_multiselect' tags,files)
if dir='' then exit
sz=0
"GETPROGDIR"
progdir=addpart(result,'')
list=''
do i=1 to files.count
if pos(':',files.i)=0 then files.i=progdir||files.i
if ~exists(files.i) then do
cecho(pr,'File' files.i 'does not exist!')
exit
end
files.i=strip(files.i,'B','"')
list=list '"'files.i'"'
sz=sz+word(statef(files.i),2)
end
list=strip(list)
cmp=getclip('sc_allwaycompresswith')
if cmp='' then cmp=rtezrequest('What compressor to use?'||NL||'Allways ZIP/LHA will make this requester go away.','Lha|Zip|Lzx|Allways Lha|Allways Zip|Allways Lzx|Abort','Kuang Eleven KDCC',tags)
Select
when cmp=0 then exit
when cmp=1 then cmp='LHA'
when cmp=2 then cmp='ZIP'
when cmp=3 then cmp='LZX'
when cmp=4 then do
cmp='LHA'
call setclip('sc_allwaycompresswith','LHA')
end
when cmp=5 then do
cmp='ZIP'
call setclip('sc_allwaycompresswith','ZIP')
end
when cmp=6 then do
cmp='LZX'
call setclip('sc_allwaycompresswith','LZX')
end
otherwise
cmp='LHA'
end
Select
when cmp='LHA' then archive=files.1||'.lha'
when cmp='ZIP' then archive=files.1||'.zip'
when cmp='LZX' then archive=files.1||'.lzx'
otherwise
cecho(pr,'Error')
exit
end
if left(archive,9)='Ram Disk:' then archive='RAM:'substr(archive,10)
do while exists(archive)
archive=pathpart(archive)'_'filepart(archive)
end
Select
when cmp='LHA' then address command 'lha -qa a "'archive'"' list
when cmp='ZIP' then address command 'zip -q "'archive'"' list
when cmp='LZX' then address command 'lzx -qa a "'archive'"' list
otherwise
cecho(pr,'Error')
exit
end
if ~exists(archive) then do
cecho(pr,'Unable to create archive' archive)
exit
end
nsz=word(statef(archive),2)
cecho(pr,'Sending pack' bld(filepart(archive)) 'to' bld(nick)'.Original:'bld(trunc(sz/1000,1))'K Compressed:'bld(trunc(nsz/1000,1))'K Ratio :'trunc((nsz/sz)*100)'%')
div='01'x
'RAW PRIVMSG' nick ':'div||'KDCC' '"'filepart(archive)'"'||div
userdomain: PROCEDURE;ip=arg(1);if datatype(compress(ip,'.'),'n') then return substr(ip,1,pos('.',ip,pos('.',ip)+1)-1)||'*';pi=translate(strip(lower(reverse(ip))),' ','.');w=words(pi);if w<3 then return ip;do i=3 to w; if ~datatype(word(pi,i),'L') then leave;end;return '*'||translate(reverse(delword(pi,i)),'.',' ')
ison:;if pos(upper(arg(1))' ',upper(getusr())' ')~==0 then return 1;else return 0
gethost: "USERHOST" arg(1);return result
uexists: if pos('@',gethost(arg(1)))~==0 then return 1;else return 0
kick:;'RAW KICK' arg(1) arg(2) ':'arg(3);return 0
mod:;'RAW MODE' channel arg(1);return 0
amrx:;'SAY /RX' arg(1);return 0
ply:
if getclip('sc_playsounds')~=='ON' then return 0
'PLAYSOUND _K11'arg(1)'.snd'
return 0
prsprg:PROCEDURE
X=addpart(ARG(1),'')
"GETPROGDIR"
Y=RESULT
IF UPPER(LEFT(X,8))='PROGDIR:' THEN RETURN addpart(Y,'')||SUBSTR(X,9)
RETURN X
rts:
if ~show('L','rexxreqtools.library') then if ~addlib('rexxreqtools.library',0,-30,0) then do